/**
 * 
 */
package se.thoka.twt.client.event;

import com.google.gwt.event.shared.GwtEvent;

/**
 * <p>Event used to request a submit of something, e.g. a form. Note that this request may be entirely ignored by handlers.</p>
 * 
 * @author Thobias Karlsson, Thoka
 * @since 9 jan 2010
 */
public class RequestSubmitEvent extends GwtEvent<RequestSubmitHandler> {
	
	private static Type<RequestSubmitHandler> TYPE = new Type<RequestSubmitHandler>();

	@Override
	protected void dispatch(RequestSubmitHandler handler) {
		handler.onSubmitRequested(this);
	}

	@Override
	public Type<RequestSubmitHandler> getAssociatedType() {
		return getType();
	}
	
	/**
	 * @return The event type
	 */
	public static Type<RequestSubmitHandler> getType() {
		return TYPE;
	}

}
